3.368 \(\int \frac {\cot ^5(e+f x)}{(a+b \sec ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=192 \[ -\frac {b^5}{4 a^3 f (a+b)^3 \left (a \cos ^2(e+f x)+b\right )^2}+\frac {b^4 (5 a+2 b)}{2 a^3 f (a+b)^4 \left (a \cos ^2(e+f x)+b\right )}+\frac {\left (a^2+5 a b+10 b^2\right ) \log (\sin (e+f x))}{f (a+b)^5}+\frac {b^3 \left (10 a^2+5 a b+b^2\right ) \log \left (a \cos ^2(e+f x)+b\right )}{2 a^3 f (a+b)^5}-\frac {\csc ^4(e+f x)}{4 f (a+b)^3}+\frac {(2 a+5 b) \csc ^2(e+f x)}{2 f (a+b)^4} \]

[Out]

-1/4*b^5/a^3/(a+b)^3/f/(b+a*cos(f*x+e)^2)^2+1/2*b^4*(5*a+2*b)/a^3/(a+b)^4/f/(b+a*cos(f*x+e)^2)+1/2*(2*a+5*b)*c
sc(f*x+e)^2/(a+b)^4/f-1/4*csc(f*x+e)^4/(a+b)^3/f+1/2*b^3*(10*a^2+5*a*b+b^2)*ln(b+a*cos(f*x+e)^2)/a^3/(a+b)^5/f
+(a^2+5*a*b+10*b^2)*ln(sin(f*x+e))/(a+b)^5/f

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 192, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4138, 446, 88} \[ -\frac {b^5}{4 a^3 f (a+b)^3 \left (a \cos ^2(e+f x)+b\right )^2}+\frac {b^4 (5 a+2 b)}{2 a^3 f (a+b)^4 \left (a \cos ^2(e+f x)+b\right )}+\frac {\left (a^2+5 a b+10 b^2\right ) \log (\sin (e+f x))}{f (a+b)^5}+\frac {b^3 \left (10 a^2+5 a b+b^2\right ) \log \left (a \cos ^2(e+f x)+b\right )}{2 a^3 f (a+b)^5}-\frac {\csc ^4(e+f x)}{4 f (a+b)^3}+\frac {(2 a+5 b) \csc ^2(e+f x)}{2 f (a+b)^4} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^5/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

-b^5/(4*a^3*(a + b)^3*f*(b + a*Cos[e + f*x]^2)^2) + (b^4*(5*a + 2*b))/(2*a^3*(a + b)^4*f*(b + a*Cos[e + f*x]^2
)) + ((2*a + 5*b)*Csc[e + f*x]^2)/(2*(a + b)^4*f) - Csc[e + f*x]^4/(4*(a + b)^3*f) + (b^3*(10*a^2 + 5*a*b + b^
2)*Log[b + a*Cos[e + f*x]^2])/(2*a^3*(a + b)^5*f) + ((a^2 + 5*a*b + 10*b^2)*Log[Sin[e + f*x]])/((a + b)^5*f)

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\cot ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^3} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x^{11}}{\left (1-x^2\right )^3 \left (b+a x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {x^5}{(1-x)^3 (b+a x)^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {\operatorname {Subst}\left (\int \left (-\frac {1}{(a+b)^3 (-1+x)^3}+\frac {-2 a-5 b}{(a+b)^4 (-1+x)^2}+\frac {-a^2-5 a b-10 b^2}{(a+b)^5 (-1+x)}-\frac {b^5}{a^2 (a+b)^3 (b+a x)^3}+\frac {b^4 (5 a+2 b)}{a^2 (a+b)^4 (b+a x)^2}-\frac {b^3 \left (10 a^2+5 a b+b^2\right )}{a^2 (a+b)^5 (b+a x)}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac {b^5}{4 a^3 (a+b)^3 f \left (b+a \cos ^2(e+f x)\right )^2}+\frac {b^4 (5 a+2 b)}{2 a^3 (a+b)^4 f \left (b+a \cos ^2(e+f x)\right )}+\frac {(2 a+5 b) \csc ^2(e+f x)}{2 (a+b)^4 f}-\frac {\csc ^4(e+f x)}{4 (a+b)^3 f}+\frac {b^3 \left (10 a^2+5 a b+b^2\right ) \log \left (b+a \cos ^2(e+f x)\right )}{2 a^3 (a+b)^5 f}+\frac {\left (a^2+5 a b+10 b^2\right ) \log (\sin (e+f x))}{(a+b)^5 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 5.26, size = 208, normalized size = 1.08 \[ \frac {\sec ^6(e+f x) (a \cos (2 (e+f x))+a+2 b)^3 \left (-\frac {b^5 (a+b)^2}{a^3 \left (-a \sin ^2(e+f x)+a+b\right )^2}+\frac {2 b^4 (a+b) (5 a+2 b)}{a^3 \left (-a \sin ^2(e+f x)+a+b\right )}+4 \left (a^2+5 a b+10 b^2\right ) \log (\sin (e+f x))+\frac {2 b^3 \left (10 a^2+5 a b+b^2\right ) \log \left (-a \sin ^2(e+f x)+a+b\right )}{a^3}-(a+b)^2 \csc ^4(e+f x)+2 (a+b) (2 a+5 b) \csc ^2(e+f x)\right )}{32 f (a+b)^5 \left (a+b \sec ^2(e+f x)\right )^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^5/(a + b*Sec[e + f*x]^2)^3,x]

[Out]

((a + 2*b + a*Cos[2*(e + f*x)])^3*Sec[e + f*x]^6*(2*(a + b)*(2*a + 5*b)*Csc[e + f*x]^2 - (a + b)^2*Csc[e + f*x
]^4 + 4*(a^2 + 5*a*b + 10*b^2)*Log[Sin[e + f*x]] + (2*b^3*(10*a^2 + 5*a*b + b^2)*Log[a + b - a*Sin[e + f*x]^2]
)/a^3 - (b^5*(a + b)^2)/(a^3*(a + b - a*Sin[e + f*x]^2)^2) + (2*b^4*(a + b)*(5*a + 2*b))/(a^3*(a + b - a*Sin[e
 + f*x]^2))))/(32*(a + b)^5*f*(a + b*Sec[e + f*x]^2)^3)

________________________________________________________________________________________

fricas [B]  time = 3.17, size = 859, normalized size = 4.47 \[ \frac {3 \, a^{5} b^{2} + 12 \, a^{4} b^{3} + 9 \, a^{3} b^{4} + 9 \, a^{2} b^{5} + 12 \, a b^{6} + 3 \, b^{7} - 2 \, {\left (2 \, a^{7} + 7 \, a^{6} b + 5 \, a^{5} b^{2} - 5 \, a^{3} b^{4} - 7 \, a^{2} b^{5} - 2 \, a b^{6}\right )} \cos \left (f x + e\right )^{6} + {\left (3 \, a^{7} + 4 \, a^{6} b - 19 \, a^{5} b^{2} - 20 \, a^{4} b^{3} - 20 \, a^{3} b^{4} - 19 \, a^{2} b^{5} + 4 \, a b^{6} + 3 \, b^{7}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (3 \, a^{6} b + 10 \, a^{5} b^{2} + 2 \, a^{4} b^{3} - 2 \, a^{2} b^{5} - 10 \, a b^{6} - 3 \, b^{7}\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left ({\left (10 \, a^{4} b^{3} + 5 \, a^{3} b^{4} + a^{2} b^{5}\right )} \cos \left (f x + e\right )^{8} + 10 \, a^{2} b^{5} + 5 \, a b^{6} + b^{7} - 2 \, {\left (10 \, a^{4} b^{3} - 5 \, a^{3} b^{4} - 4 \, a^{2} b^{5} - a b^{6}\right )} \cos \left (f x + e\right )^{6} + {\left (10 \, a^{4} b^{3} - 35 \, a^{3} b^{4} - 9 \, a^{2} b^{5} + a b^{6} + b^{7}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (10 \, a^{3} b^{4} - 5 \, a^{2} b^{5} - 4 \, a b^{6} - b^{7}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (a \cos \left (f x + e\right )^{2} + b\right ) + 4 \, {\left ({\left (a^{7} + 5 \, a^{6} b + 10 \, a^{5} b^{2}\right )} \cos \left (f x + e\right )^{8} + a^{5} b^{2} + 5 \, a^{4} b^{3} + 10 \, a^{3} b^{4} - 2 \, {\left (a^{7} + 4 \, a^{6} b + 5 \, a^{5} b^{2} - 10 \, a^{4} b^{3}\right )} \cos \left (f x + e\right )^{6} + {\left (a^{7} + a^{6} b - 9 \, a^{5} b^{2} - 35 \, a^{4} b^{3} + 10 \, a^{3} b^{4}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{6} b + 4 \, a^{5} b^{2} + 5 \, a^{4} b^{3} - 10 \, a^{3} b^{4}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (f x + e\right )\right )}{4 \, {\left ({\left (a^{10} + 5 \, a^{9} b + 10 \, a^{8} b^{2} + 10 \, a^{7} b^{3} + 5 \, a^{6} b^{4} + a^{5} b^{5}\right )} f \cos \left (f x + e\right )^{8} - 2 \, {\left (a^{10} + 4 \, a^{9} b + 5 \, a^{8} b^{2} - 5 \, a^{6} b^{4} - 4 \, a^{5} b^{5} - a^{4} b^{6}\right )} f \cos \left (f x + e\right )^{6} + {\left (a^{10} + a^{9} b - 9 \, a^{8} b^{2} - 25 \, a^{7} b^{3} - 25 \, a^{6} b^{4} - 9 \, a^{5} b^{5} + a^{4} b^{6} + a^{3} b^{7}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{9} b + 4 \, a^{8} b^{2} + 5 \, a^{7} b^{3} - 5 \, a^{5} b^{5} - 4 \, a^{4} b^{6} - a^{3} b^{7}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{8} b^{2} + 5 \, a^{7} b^{3} + 10 \, a^{6} b^{4} + 10 \, a^{5} b^{5} + 5 \, a^{4} b^{6} + a^{3} b^{7}\right )} f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5/(a+b*sec(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

1/4*(3*a^5*b^2 + 12*a^4*b^3 + 9*a^3*b^4 + 9*a^2*b^5 + 12*a*b^6 + 3*b^7 - 2*(2*a^7 + 7*a^6*b + 5*a^5*b^2 - 5*a^
3*b^4 - 7*a^2*b^5 - 2*a*b^6)*cos(f*x + e)^6 + (3*a^7 + 4*a^6*b - 19*a^5*b^2 - 20*a^4*b^3 - 20*a^3*b^4 - 19*a^2
*b^5 + 4*a*b^6 + 3*b^7)*cos(f*x + e)^4 + 2*(3*a^6*b + 10*a^5*b^2 + 2*a^4*b^3 - 2*a^2*b^5 - 10*a*b^6 - 3*b^7)*c
os(f*x + e)^2 + 2*((10*a^4*b^3 + 5*a^3*b^4 + a^2*b^5)*cos(f*x + e)^8 + 10*a^2*b^5 + 5*a*b^6 + b^7 - 2*(10*a^4*
b^3 - 5*a^3*b^4 - 4*a^2*b^5 - a*b^6)*cos(f*x + e)^6 + (10*a^4*b^3 - 35*a^3*b^4 - 9*a^2*b^5 + a*b^6 + b^7)*cos(
f*x + e)^4 + 2*(10*a^3*b^4 - 5*a^2*b^5 - 4*a*b^6 - b^7)*cos(f*x + e)^2)*log(a*cos(f*x + e)^2 + b) + 4*((a^7 +
5*a^6*b + 10*a^5*b^2)*cos(f*x + e)^8 + a^5*b^2 + 5*a^4*b^3 + 10*a^3*b^4 - 2*(a^7 + 4*a^6*b + 5*a^5*b^2 - 10*a^
4*b^3)*cos(f*x + e)^6 + (a^7 + a^6*b - 9*a^5*b^2 - 35*a^4*b^3 + 10*a^3*b^4)*cos(f*x + e)^4 + 2*(a^6*b + 4*a^5*
b^2 + 5*a^4*b^3 - 10*a^3*b^4)*cos(f*x + e)^2)*log(1/2*sin(f*x + e)))/((a^10 + 5*a^9*b + 10*a^8*b^2 + 10*a^7*b^
3 + 5*a^6*b^4 + a^5*b^5)*f*cos(f*x + e)^8 - 2*(a^10 + 4*a^9*b + 5*a^8*b^2 - 5*a^6*b^4 - 4*a^5*b^5 - a^4*b^6)*f
*cos(f*x + e)^6 + (a^10 + a^9*b - 9*a^8*b^2 - 25*a^7*b^3 - 25*a^6*b^4 - 9*a^5*b^5 + a^4*b^6 + a^3*b^7)*f*cos(f
*x + e)^4 + 2*(a^9*b + 4*a^8*b^2 + 5*a^7*b^3 - 5*a^5*b^5 - 4*a^4*b^6 - a^3*b^7)*f*cos(f*x + e)^2 + (a^8*b^2 +
5*a^7*b^3 + 10*a^6*b^4 + 10*a^5*b^5 + 5*a^4*b^6 + a^3*b^7)*f)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5/(a+b*sec(f*x+e)^2)^3,x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*((-32*((1-cos(
f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b^3-96*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b^2*a-96*((1-cos(f*x+ex
p(1)))/(1+cos(f*x+exp(1))))^2*b*a^2-32*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*a^3+1152*(1-cos(f*x+exp(1))
)/(1+cos(f*x+exp(1)))*b^3+2688*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b^2*a+1920*(1-cos(f*x+exp(1)))/(1+cos(f
*x+exp(1)))*b*a^2+384*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*a^3)/(4096*b^6+24576*b^5*a+61440*b^4*a^2+81920*b
^3*a^3+61440*b^2*a^4+24576*b*a^5+4096*a^6)+(-32*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^6*b^7-224*((1-cos(f*
x+exp(1)))/(1+cos(f*x+exp(1))))^6*b^6*a-672*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^6*b^5*a^2-960*((1-cos(f*
x+exp(1)))/(1+cos(f*x+exp(1))))^6*b^4*a^3-720*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^6*b^3*a^4-336*((1-cos(
f*x+exp(1)))/(1+cos(f*x+exp(1))))^6*b^2*a^5-112*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^6*b*a^6-16*((1-cos(f
*x+exp(1)))/(1+cos(f*x+exp(1))))^6*a^7-128*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^5*b^7-512*((1-cos(f*x+exp
(1)))/(1+cos(f*x+exp(1))))^5*b^6*a-384*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^5*b^5*a^2+676*((1-cos(f*x+exp
(1)))/(1+cos(f*x+exp(1))))^5*b^4*a^3+1080*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^5*b^3*a^4+720*((1-cos(f*x+
exp(1)))/(1+cos(f*x+exp(1))))^5*b^2*a^5+392*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^5*b*a^6+76*((1-cos(f*x+e
xp(1)))/(1+cos(f*x+exp(1))))^5*a^7-192*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^4*b^7-576*((1-cos(f*x+exp(1))
)/(1+cos(f*x+exp(1))))^4*b^6*a-704*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^4*b^5*a^2-1777*((1-cos(f*x+exp(1)
))/(1+cos(f*x+exp(1))))^4*b^4*a^3-1572*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^4*b^3*a^4-838*((1-cos(f*x+exp
(1)))/(1+cos(f*x+exp(1))))^4*b^2*a^5-612*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^4*b*a^6-145*((1-cos(f*x+exp
(1)))/(1+cos(f*x+exp(1))))^4*a^7-128*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^3*b^7-512*((1-cos(f*x+exp(1)))/
(1+cos(f*x+exp(1))))^3*b^6*a-384*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^3*b^5*a^2+852*((1-cos(f*x+exp(1)))/
(1+cos(f*x+exp(1))))^3*b^4*a^3+1096*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^3*b^3*a^4+672*((1-cos(f*x+exp(1)
))/(1+cos(f*x+exp(1))))^3*b^2*a^5+568*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^3*b*a^6+140*((1-cos(f*x+exp(1)
))/(1+cos(f*x+exp(1))))^3*a^7-32*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b^7-224*((1-cos(f*x+exp(1)))/(1+c
os(f*x+exp(1))))^2*b^6*a-672*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b^5*a^2-822*((1-cos(f*x+exp(1)))/(1+c
os(f*x+exp(1))))^2*b^4*a^3-536*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b^3*a^4-436*((1-cos(f*x+exp(1)))/(1
+cos(f*x+exp(1))))^2*b^2*a^5-312*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b*a^6-70*((1-cos(f*x+exp(1)))/(1+
cos(f*x+exp(1))))^2*a^7+32*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b^4*a^3+112*(1-cos(f*x+exp(1)))/(1+cos(f*x+
exp(1)))*b^3*a^4+144*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b^2*a^5+80*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))
)*b*a^6+16*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*a^7-b^4*a^3-4*b^3*a^4-6*b^2*a^5-4*b*a^6-a^7)/(128*b^5*a^3+6
40*b^4*a^4+1280*b^3*a^5+1280*b^2*a^6+640*b*a^7+128*a^8)/(((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^3*b+((1-cos
(f*x+exp(1)))/(1+cos(f*x+exp(1))))^3*a+2*((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b-2*((1-cos(f*x+exp(1)))/
(1+cos(f*x+exp(1))))^2*a+(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b+(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*a)^
2-1/2/a^3*ln(abs((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))+1))+(10*b^2+5*b*a+a^2)/(4*b^5+20*b^4*a+40*b^3*a^2+40*
b^2*a^3+20*b*a^4+4*a^5)*ln(abs(1-cos(f*x+exp(1)))/abs(1+cos(f*x+exp(1))))+(b^5+5*b^4*a+10*b^3*a^2)/(4*b^5*a^3+
20*b^4*a^4+40*b^3*a^5+40*b^2*a^6+20*b*a^7+4*a^8)*ln(((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1))))^2*b+((1-cos(f*x+
exp(1)))/(1+cos(f*x+exp(1))))^2*a+2*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*b-2*(1-cos(f*x+exp(1)))/(1+cos(f*x
+exp(1)))*a+b+a))

________________________________________________________________________________________

maple [B]  time = 1.46, size = 522, normalized size = 2.72 \[ \frac {5 b^{3} \ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{f \left (a +b \right )^{5} a}+\frac {5 b^{4} \ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{2 f \left (a +b \right )^{5} a^{2}}+\frac {b^{5} \ln \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}{2 f \left (a +b \right )^{5} a^{3}}-\frac {b^{5}}{4 f \left (a +b \right )^{5} a \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )^{2}}-\frac {b^{6}}{2 f \left (a +b \right )^{5} a^{2} \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )^{2}}-\frac {b^{7}}{4 f \left (a +b \right )^{5} a^{3} \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )^{2}}+\frac {5 b^{4}}{2 f \left (a +b \right )^{5} a \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}+\frac {7 b^{5}}{2 f \left (a +b \right )^{5} a^{2} \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}+\frac {b^{6}}{f \left (a +b \right )^{5} a^{3} \left (b +a \left (\cos ^{2}\left (f x +e \right )\right )\right )}-\frac {1}{16 f \left (a +b \right )^{3} \left (-1+\cos \left (f x +e \right )\right )^{2}}-\frac {7 a}{16 f \left (a +b \right )^{4} \left (-1+\cos \left (f x +e \right )\right )}-\frac {19 b}{16 f \left (a +b \right )^{4} \left (-1+\cos \left (f x +e \right )\right )}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right ) a^{2}}{2 f \left (a +b \right )^{5}}+\frac {5 \ln \left (-1+\cos \left (f x +e \right )\right ) a b}{2 f \left (a +b \right )^{5}}+\frac {5 \ln \left (-1+\cos \left (f x +e \right )\right ) b^{2}}{f \left (a +b \right )^{5}}-\frac {1}{16 f \left (a +b \right )^{3} \left (1+\cos \left (f x +e \right )\right )^{2}}+\frac {7 a}{16 f \left (a +b \right )^{4} \left (1+\cos \left (f x +e \right )\right )}+\frac {19 b}{16 f \left (a +b \right )^{4} \left (1+\cos \left (f x +e \right )\right )}+\frac {\ln \left (1+\cos \left (f x +e \right )\right ) a^{2}}{2 f \left (a +b \right )^{5}}+\frac {5 \ln \left (1+\cos \left (f x +e \right )\right ) a b}{2 f \left (a +b \right )^{5}}+\frac {5 \ln \left (1+\cos \left (f x +e \right )\right ) b^{2}}{f \left (a +b \right )^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^5/(a+b*sec(f*x+e)^2)^3,x)

[Out]

5/f*b^3/(a+b)^5/a*ln(b+a*cos(f*x+e)^2)+5/2/f*b^4/(a+b)^5/a^2*ln(b+a*cos(f*x+e)^2)+1/2/f*b^5/(a+b)^5/a^3*ln(b+a
*cos(f*x+e)^2)-1/4/f*b^5/(a+b)^5/a/(b+a*cos(f*x+e)^2)^2-1/2/f*b^6/(a+b)^5/a^2/(b+a*cos(f*x+e)^2)^2-1/4/f*b^7/(
a+b)^5/a^3/(b+a*cos(f*x+e)^2)^2+5/2/f*b^4/(a+b)^5/a/(b+a*cos(f*x+e)^2)+7/2/f*b^5/(a+b)^5/a^2/(b+a*cos(f*x+e)^2
)+1/f*b^6/(a+b)^5/a^3/(b+a*cos(f*x+e)^2)-1/16/f/(a+b)^3/(-1+cos(f*x+e))^2-7/16/f/(a+b)^4/(-1+cos(f*x+e))*a-19/
16/f/(a+b)^4/(-1+cos(f*x+e))*b+1/2/f/(a+b)^5*ln(-1+cos(f*x+e))*a^2+5/2/f/(a+b)^5*ln(-1+cos(f*x+e))*a*b+5/f/(a+
b)^5*ln(-1+cos(f*x+e))*b^2-1/16/f/(a+b)^3/(1+cos(f*x+e))^2+7/16/f/(a+b)^4/(1+cos(f*x+e))*a+19/16/f/(a+b)^4/(1+
cos(f*x+e))*b+1/2/f/(a+b)^5*ln(1+cos(f*x+e))*a^2+5/2/f/(a+b)^5*ln(1+cos(f*x+e))*a*b+5/f/(a+b)^5*ln(1+cos(f*x+e
))*b^2

________________________________________________________________________________________

maxima [B]  time = 0.36, size = 454, normalized size = 2.36 \[ \frac {\frac {2 \, {\left (10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}\right )} \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a^{8} + 5 \, a^{7} b + 10 \, a^{6} b^{2} + 10 \, a^{5} b^{3} + 5 \, a^{4} b^{4} + a^{3} b^{5}} + \frac {2 \, {\left (a^{2} + 5 \, a b + 10 \, b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{5} + 5 \, a^{4} b + 10 \, a^{3} b^{2} + 10 \, a^{2} b^{3} + 5 \, a b^{4} + b^{5}} + \frac {2 \, {\left (2 \, a^{6} + 5 \, a^{5} b - 5 \, a^{2} b^{4} - 2 \, a b^{5}\right )} \sin \left (f x + e\right )^{6} - a^{6} - 3 \, a^{5} b - 3 \, a^{4} b^{2} - a^{3} b^{3} - {\left (9 \, a^{6} + 29 \, a^{5} b + 20 \, a^{4} b^{2} - 10 \, a^{2} b^{4} - 13 \, a b^{5} - 3 \, b^{6}\right )} \sin \left (f x + e\right )^{4} + 2 \, {\left (3 \, a^{6} + 11 \, a^{5} b + 13 \, a^{4} b^{2} + 5 \, a^{3} b^{3}\right )} \sin \left (f x + e\right )^{2}}{{\left (a^{9} + 4 \, a^{8} b + 6 \, a^{7} b^{2} + 4 \, a^{6} b^{3} + a^{5} b^{4}\right )} \sin \left (f x + e\right )^{8} - 2 \, {\left (a^{9} + 5 \, a^{8} b + 10 \, a^{7} b^{2} + 10 \, a^{6} b^{3} + 5 \, a^{5} b^{4} + a^{4} b^{5}\right )} \sin \left (f x + e\right )^{6} + {\left (a^{9} + 6 \, a^{8} b + 15 \, a^{7} b^{2} + 20 \, a^{6} b^{3} + 15 \, a^{5} b^{4} + 6 \, a^{4} b^{5} + a^{3} b^{6}\right )} \sin \left (f x + e\right )^{4}}}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5/(a+b*sec(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

1/4*(2*(10*a^2*b^3 + 5*a*b^4 + b^5)*log(a*sin(f*x + e)^2 - a - b)/(a^8 + 5*a^7*b + 10*a^6*b^2 + 10*a^5*b^3 + 5
*a^4*b^4 + a^3*b^5) + 2*(a^2 + 5*a*b + 10*b^2)*log(sin(f*x + e)^2)/(a^5 + 5*a^4*b + 10*a^3*b^2 + 10*a^2*b^3 +
5*a*b^4 + b^5) + (2*(2*a^6 + 5*a^5*b - 5*a^2*b^4 - 2*a*b^5)*sin(f*x + e)^6 - a^6 - 3*a^5*b - 3*a^4*b^2 - a^3*b
^3 - (9*a^6 + 29*a^5*b + 20*a^4*b^2 - 10*a^2*b^4 - 13*a*b^5 - 3*b^6)*sin(f*x + e)^4 + 2*(3*a^6 + 11*a^5*b + 13
*a^4*b^2 + 5*a^3*b^3)*sin(f*x + e)^2)/((a^9 + 4*a^8*b + 6*a^7*b^2 + 4*a^6*b^3 + a^5*b^4)*sin(f*x + e)^8 - 2*(a
^9 + 5*a^8*b + 10*a^7*b^2 + 10*a^6*b^3 + 5*a^5*b^4 + a^4*b^5)*sin(f*x + e)^6 + (a^9 + 6*a^8*b + 15*a^7*b^2 + 2
0*a^6*b^3 + 15*a^5*b^4 + 6*a^4*b^5 + a^3*b^6)*sin(f*x + e)^4))/f

________________________________________________________________________________________

mupad [B]  time = 6.42, size = 327, normalized size = 1.70 \[ \frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a^2+5\,a\,b+10\,b^2\right )}{f\,\left (a^5+5\,a^4\,b+10\,a^3\,b^2+10\,a^2\,b^3+5\,a\,b^4+b^5\right )}-\frac {\frac {1}{4\,\left (a+b\right )}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (a+3\,b\right )}{2\,{\left (a+b\right )}^2}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (-4\,a^3\,b-15\,a^2\,b^2+9\,a\,b^3+2\,b^4\right )}{4\,a^2\,\left (a+b\right )\,\left (a^2+2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (-a^3\,b^2-4\,a^2\,b^3+4\,a\,b^4+b^5\right )}{2\,a^2\,{\left (a+b\right )}^2\,\left (a^2+2\,a\,b+b^2\right )}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^4\,\left (a^2+2\,a\,b+b^2\right )+{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (2\,b^2+2\,a\,b\right )+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^8\right )}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,a^3\,f}+\frac {b^3\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a+b\right )\,\left (10\,a^2+5\,a\,b+b^2\right )}{2\,a^3\,f\,{\left (a+b\right )}^5} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^5/(a + b/cos(e + f*x)^2)^3,x)

[Out]

(log(tan(e + f*x))*(5*a*b + a^2 + 10*b^2))/(f*(5*a*b^4 + 5*a^4*b + a^5 + b^5 + 10*a^2*b^3 + 10*a^3*b^2)) - (1/
(4*(a + b)) - (tan(e + f*x)^2*(a + 3*b))/(2*(a + b)^2) + (tan(e + f*x)^4*(9*a*b^3 - 4*a^3*b + 2*b^4 - 15*a^2*b
^2))/(4*a^2*(a + b)*(2*a*b + a^2 + b^2)) + (tan(e + f*x)^6*(4*a*b^4 + b^5 - 4*a^2*b^3 - a^3*b^2))/(2*a^2*(a +
b)^2*(2*a*b + a^2 + b^2)))/(f*(tan(e + f*x)^4*(2*a*b + a^2 + b^2) + tan(e + f*x)^6*(2*a*b + 2*b^2) + b^2*tan(e
 + f*x)^8)) - log(tan(e + f*x)^2 + 1)/(2*a^3*f) + (b^3*log(a + b + b*tan(e + f*x)^2)*(5*a*b + 10*a^2 + b^2))/(
2*a^3*f*(a + b)^5)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**5/(a+b*sec(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________